home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8523 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  855 b 

  1. Path: dfw.dfw.net!not-for-mail
  2. From: ftlgeuse@dfw.dfw.net (Fetelgeuse)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Hiding a password
  5. Date: 4 Mar 1996 10:51:56 GMT
  6. Organization: DFW Internet Services - DFWNet: 800-2-DFWNet
  7. Message-ID: <4hei0c$1fr@fnord.dfw.net>
  8. References: <1996Feb29.224936.137160@forest> <4he620$qf2@hpbblb.bbn.hp.com> <4hehmd$1fr@fnord.dfw.net>
  9. NNTP-Posting-Host: dfw.dfw.net
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Fetelgeuse (ftlgeuse@dfw.dfw.net) wrote:
  13. : I wrote a function to do precisely the same thing. I made a function
  14. : something like:
  15. : char * GetString_NoEcho()
  16. : {
  17. :   char *temp;
  18. :   int i=1;
  19. :   while(temp[i-1]!=13) {
  20. :     temp[i-1]=getch();  
  21. :     i++;
  22. :   }
  23. :   temp[i]=0;
  24. : }
  25. :
  26.  
  27. OOPS! sorry - be sure and add a return to that:
  28.  
  29. ...
  30. ...
  31. temp[i]=0;
  32. return(temp);
  33. }
  34. Now all else said before still applies.
  35. Fetelgeuse
  36.      
  37.